package com.cql.sys.service;

import com.cql.pojo.Detials;
import com.github.pagehelper.PageInfo;
import com.cql.pojo.Dict;

import java.util.List;

public interface DictService {

    /**
     * 添加字典数据
     * @param dict
     * @return
     * @throws Exception
     */
    int addDict(Dict dict) throws Exception;

    /**
     * 查询字典数据
     * @param dname
     * @return
     * @throws Exception
     */
    Dict findDict(String dname) throws Exception;

    /**
     * 插入字典数据
     * @param dict
     * @return
     * @throws Exception
     */
    int insertDict(Dict dict) throws Exception;

    /**
     * 分页查询字典数据
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<Dict> findDictByPage(Integer pageNum, Integer pageSize);

    int updateDict(Dict dict) throws Exception;

    Dict findDictById(Integer id) throws Exception;

    int deleteDictById(int id) throws Exception;

    List<Detials> findAllDetails(Dict  dict) throws  Exception;
}
